home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Franz PD
/
Franz PD Disk #279 (1993)(Rhein-Sieg-Soft).zip
/
Franz PD Disk #279 (1993)(Rhein-Sieg-Soft).adf
/
ak_gen0-lib_V38.20.LHA
/
ak_gen0-library
/
Programmers.LHA
/
Programmers
/
Examples
/
ShowModes.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-06-26
|
2KB
|
60 lines
/* ShowModes V37.83 */
/* FREEWARE. */
/* (c) 1993 by Andreas R. Kleinert. */
/* Demonstrates use of the "ak_gen0.library"'s ModeList. */
/* Written in SAS/C V6.00 for OS V2.04 (V37) Includes. */
#include <ak_gen0/ak_gen0_pragma.h>
#include <proto/exec.h>
#include <proto/dos.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void main(long argc, char **argv)
{
struct List *modelist = N;
struct AK_ModeEntry *selmode = N;
printf("\nShowModes V37.83, FREEWARE, (c) 1993 by Andreas R. Kleinert.\n");
AKBase = (struct AKBase *) OpenLibrary("ak_gen0.library", 37); /* minimum */
if(AKBase)
{
modelist = (struct List *) AK_GetModeList();
if(modelist)
{
for(selmode=(APTR)modelist->lh_Head;(selmode)&&(selmode!=(APTR) &(modelist->lh_Tail));)
{
printf("\n Modus-Name : %s", selmode->ModeName);
printf("\n Dimensions : max. %ldx%ld", selmode->StandardWidth,
selmode->StandardHeight);
printf("\n OverScan : max. %ldx%ld", selmode->MaxWidth,
selmode->MaxHeight);
printf("\n MaxColors : max. %ld ", 1<<selmode->MaxDepth);
selmode = (APTR) selmode->ModeNode.ln_Succ;
}
printf("\n\n No more information.\n");
AK_FreeModeList((APTR) modelist);
}else
{
printf("\n Attempt to create Mode-List failed.\n");
}
CloseLibrary((APTR) AKBase);
}else
{
printf("\n Can't open \42ak_gen0.library\42 V37+ !\n");
}
CloseLibrary((APTR) IntuitionBase);
exit(0);
}